﻿namespace CodeGenerator.CSharp
{
    public class Event : CodeUnit
    {
        public Event(string name, ModifierCollection modifiers, string dataType)
            : base(name, modifiers)
        { this.DataType = dataType; }

        public override string ToString()
        {
            CodeBuilder Code = new CodeBuilder();

            base.AppendDocumentation(Code);
            base.AppendAttributes(Code);

            Code.Add("{0}{1} event {2} {3}", base.Padding, base.Modifiers, this.DataType, this.Name);

            return Code.ToString();
        }

    }
}
